package com.poisonh.unifiedauth.dao;


import com.poisonh.unifiedauth.model.UserInfoModel;

import java.util.List;

/**
 * Created by PoisonH on 2016/7/15.
 */
public interface UserinfoDao
{
    /**
     * 添加一条记录
     *
     * @param userInfoModel
     * @throws Exception
     */
    void addone(UserInfoModel userInfoModel) throws Exception;

    /**
     * 添加一个集合
     *
     * @param list
     * @throws Exception
     */

    void addList(List<UserInfoModel> list) throws Exception;

    /**
     * 条件删除
     *
     * @param id
     * @throws Exception
     */

    void delete(int id) throws Exception;

    /**
     * 根据条件查询返回List集合
     *
     * @param id
     * @return
     * @throws Exception
     */

    List<UserInfoModel> queryReturnList(String id) throws Exception;

    /**
     * 根据条件查询返回单个条目
     *
     * @param id
     * @return
     * @throws Exception
     */

    UserInfoModel queryReturnOne(String id) throws Exception;

    /**
     * 查询所有
     *
     * @return
     * @throws Exception
     */

    List<UserInfoModel> findAll() throws Exception;

    /**
     * 更新数据
     *
     * @return
     * @throws Exception
     */

    void updata(UserInfoModel userInfoModel) throws Exception;

    /**
     * 关闭对象
     *
     * @throws Exception
     */

    void close() throws Exception;

    /**
     * 提交事务
     *
     * @throws Exception
     */
    void commit() throws Exception;
}
